<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class AlterCustomerCouponAddActivityInfo extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('customer_coupons', function (Blueprint $table) {
            $table->unsignedInteger('activityType')->default(0)
                  ->comment('活动类型')
                  ->after('activityId');

            $table->string("activityName")->default("")->comment("活动名称")->after("activityId");
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('customer_coupons', function (Blueprint $table) {
            $table->dropColumn(["activityType", "activityName"]);
        });
    }
}
